<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>糯米官网</title>

    <!--获取屏幕宽度，根据屏幕宽度进行自适应-->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!--引入bootStrap-->
    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap.min.css"/>

    <!--bootstrap 依赖jQuery-->
    <script src="js/jquery-3.5.0.min.js"></script>
    <script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="css/header.css" type="text/css"/>
    <script type="text/javascript" src="js/http.js"></script>
    <script src="layui/layui.js" charset="utf-8"></script>
</head>

<body>



<div class="container">
    <div class="row">
        <script src="js/header.js"></script>
    </div>

    <div class="row">
        <div class="page-header">
            <h1>糯米集团
                <small>专卖山寨大牌，干掉京东苏宁，吞并淘宝，称霸中国</small>
            </h1>
        </div>
    </div>
    <div class="row">

        <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                <li data-target="#carousel-example-generic" data-slide-to="3"></li>
                <li data-target="#carousel-example-generic" data-slide-to="4"></li>
            </ol>

            <!-- Wrapper for slides -->
            <div class="carousel-inner" role="listbox">
                <div class="item active">
                    <img src="img/xmad_15421940375432_MVXTr.jpg" alt="...">
                    <div class="carousel-caption">
                    </div>
                </div>
                <div class="item">
                    <img src="img/xmad_15424384618875_xqQTp.jpg" alt="...">
                    <div class="carousel-caption">
                    </div>
                </div>
                <div class="item">
                    <img src="img/xmad_15425931208271_yKAHi.jpg" alt="...">
                    <div class="carousel-caption">
                    </div>
                </div>
                <div class="item">
                    <img src="img/xmad_15426295907056_itWDa.jpg" alt="...">
                    <div class="carousel-caption">
                    </div>
                </div>
                <div class="item">
                    <img src="img/xmad_15426324927986_JhfvI.jpg" alt="...">
                    <div class="carousel-caption">
                    </div>
                </div>

            </div>

            <!-- Controls -->
            <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>
        </div>
    </div>

    <div class="row" style="padding-top: 10px">
        <h3 style="float: left">手机</h3>
        <a href="" style="float: right">
            <small>查看更多</small>
        </a>
    </div>
    <div class="row" id="div_phone_list"></div>
    <div class="row" id="div_goods_list" style="margin-top: 30px"></div>
    <div class="row">
        <img src="img/af1d661322b54160a34bd319a671b6d9.jpg" alt="" style="width: 100%;height: 240px">
    </div>

    <div class="row" style="padding-top: 10px">
        <h3 style="float: left">杂货</h3>
        <a href="" style="float: right">
            <small>查看更多</small>
        </a>
    </div>
    <div class="row" id="div_groceries_list"></div>
    <div class="row" id="div_electrical_goods_list" style="margin-top: 30px"></div>
    <div class="row">
        <img src="img/af1d661322b54160a34bd319a671b6d9.jpg" alt="" style="width: 100%;height: 240px">
    </div>

    <div class="row" style="padding-top: 10px">
        <h3 style="float: left">智能</h3>
        <a href="" style="float: right">
            <small>查看更多</small>
        </a>
    </div>
    <div class="row" id="div_intelligence_list"></div>
    <div class="row" id="div_intelligence_goods_list" style="margin-top: 30px"></div>
    <div class="row">
        <img src="img/af1d661322b54160a34bd319a671b6d9.jpg" alt="" style="width: 100%;height: 240px">
    </div>

    <hr>

    <div class="row">
        <script src="js/tail.js"></script>
    </div>


</div>


<template id="template_goods_info">
    <div class="col-xs-2" style="height: 450px;padding: 0 5px 0 5px">
        <div class="thumbnail">
            <img src="{{goodsUrl}}" alt="...">
            <div class="caption">
                <h3 class="goods_name" style="font-size: 15px;height: 100px">{{goodsName}}</h3>
                <h3 style="float: left">￥</h3>
                <h3 class="price">{{goodsPrice}}</h3>
                <p>
                    <a href="#" class="btn btn-primary" role="button">购买</a>
                </p>
                <p>
                    <button class="btn btn-default" onclick="addCart(this)" type="{{id}}">加入购物车</button>
                </p>
            </div>
        </div>
    </div>
</template>

<template id="template_phone_info">
    <div class="col-xs-3" style="height: 580px;padding: 0 5px 0 5px">
        <div class="thumbnail">
            <img src="{{goodsUrl}}" alt="...">
            <div class="caption">
                <h3 class="goods_name" style="font-size: 15px;height: 100px">{{goodsName}}</h3>
                <h3 style="float: left">￥</h3>
                <h3 class="price">{{goodsPrice}}</h3>
                <p>
                    <a href="#" class="btn btn-primary" role="button">购买</a>
                </p>
                <p>
                    <button class="btn btn-default" onclick="addCart(this)" type="{{id}}">加入购物车</button>
                </p>
            </div>
        </div>
    </div>
</template>


<template id="template_intelligence_info">
    <div class="col-xs-3" style="height: 580px;padding: 0 5px 0 5px">
        <div class="thumbnail">
            <img src="{{goodsUrl}}" alt="...">
            <div class="caption">
                <h3 class="goods_name" style="font-size: 15px;height: 100px">{{goodsName}}</h3>
                <h3 style="float: left">￥</h3>
                <h3 class="price">{{goodsPrice}}</h3>
                <p>
                    <a href="#" class="btn btn-primary" role="button">购买</a>
                </p>
                <p>
                    <button class="btn btn-default" onclick="addCart(this)" type="{{id}}">加入购物车</button>
                </p>
            </div>
        </div>
    </div>
</template>

<script>
    layui.use(['util', 'laydate', 'layer'], function(){
        let util = layui.util
            ,layer = layui.layer;
        //固定块
        util.fixbar({
            bar1: true
            ,bar2: true
            ,css: {right: 50, bottom: 100}
            ,bgcolor: '#393D49'
            ,click: function(type){
                if(type === 'bar1'){
                    layer.msg('icon 是可以随便换的')
                } else if(type === 'bar2') {
                    layer.msg('两个 bar 都可以设定是否开启')
                }
            }
        })})

</script>

</body>
</html>

<script src="js/index.js"></script>

<script src="js/cart.js"></script>